home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Basic / Visual Basic.60 / COMMON / TOOLS / VCM / VCM.MDB / VcmComponentContainer / 14_Cabinet / DBTREEVW.H < prev    next >
Encoding:
C/C++ Source or Header  |  1998-05-18  |  2.5 KB  |  100 lines

  1. // DBTreeVw.h : header file
  2. //
  3. // This is a part of the Microsoft Foundation Classes and
  4. // Templates (MFC&T).
  5. // Copyright (C) 1998 Microsoft Corporation
  6. // All rights reserved.
  7. //
  8. // This source code is only intended as a supplement to the
  9. // MFC&T Reference and related electronic documentation provided
  10. // with the library.  See these sources for detailed information
  11. // regarding the MFC&T product.
  12. //
  13.  
  14. #ifndef __DBTREEVW_H__
  15. #define __DBTREEVW_H__
  16.  
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CDBTreeView view
  19.  
  20. class CDBTreeView : public CTreeView
  21. {
  22. protected:
  23.     CDBTreeView();           // protected constructor used by dynamic creation
  24.     DECLARE_DYNCREATE(CDBTreeView)
  25.  
  26. // Attributes
  27. public:
  28.     UINT m_nIDClipFormat;
  29.     CTreeCursor m_ItemSel;
  30.     BOOL m_bNoNotifications;
  31.     CDBViewDoc* GetDocument();
  32.     CSession*   m_pSession;
  33.  
  34.     enum ImageIDS{
  35.         IID_DATABASE = 0,IID_DATABASES,
  36.         IID_TABLE,IID_TABLES,
  37.         IID_FIELD,IID_FIELDS,
  38.         IID_INDEX,IID_INDEXES,
  39.         IID_VIEW,IID_VIEWS,
  40.         IID_PROCEDURE,IID_PROCEDURES,
  41.         IID_FOREIGNKEY, IID_FOREIGNKEYS
  42.     };
  43.  
  44. protected:
  45.     CImageList m_ctlImage;
  46.  
  47.     // Some bookmarks to places in the tree
  48.     CTreeCursor tDatabases, tDatabase;
  49.     CTreeCursor tTables, tTable;
  50.     CTreeCursor tView, tProcedures;
  51.  
  52.     COleDropTarget m_dropTarget;
  53.  
  54. // Operations
  55. public:
  56.     void PopulateTree();
  57.     void AddItem(WORD nItemType, LPCTSTR lpszName);
  58.     void DeleteItem(CTreeCursor& itemDelete);
  59.  
  60. // Overrides
  61.     // ClassWizard generated virtual function overrides
  62.     //{{AFX_VIRTUAL(CDBTreeView)
  63.     protected:
  64.     //}}AFX_VIRTUAL
  65.  
  66. // Implementation
  67. protected:
  68.     virtual ~CDBTreeView();
  69. #ifdef _DEBUG
  70.     virtual void AssertValid() const;
  71.     virtual void Dump(CDumpContext& dc) const;
  72. #endif
  73.  
  74.     // Generated message map functions
  75. protected:
  76.     //{{AFX_MSG(CDBTreeView)
  77.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  78.     afx_msg void OnSysColorChange();
  79.     afx_msg void OnQueryEdit();
  80.     //}}AFX_MSG
  81.     afx_msg void OnPopupCommand(UINT nMenuID);
  82.     void OnNodeSelect(NMHDR *pNotifyStruct,LRESULT *result);
  83.     void OnKeyDown(NMHDR *pNotifyStruct,LRESULT *result);
  84.     void OnRightClick(NMHDR *pNotifyStruct,LRESULT *result);
  85.     void DoPopupMenu(UINT nMenuID);
  86.  
  87.     DECLARE_MESSAGE_MAP()
  88. };
  89.  
  90. #ifndef _DEBUG  // debug version in DBViewVw.cpp
  91. inline CDBViewDoc* CDBTreeView::GetDocument()
  92.    { return (CDBViewDoc*)m_pDocument; }
  93. #endif
  94.  
  95. /////////////////////////////////////////////////////////////////////////////
  96.  
  97. #endif // __DBTREEVW_H__
  98.  
  99. /////////////////////////////////////////////////////////////////////////////
  100.